home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-10-14 | 1.5 KB | 61 lines | [TEXT/MMCC] |
- //---------------------------------------------------------------------
- //---------------------------------------------------------------------
- //
- // Horrible Rickety Shell, by Dave Johnson
- //
- // © Copyright 1985 - 1994 Anyone Who Wants It,
- // All Rights Energetically Heaved as far away from me as possible.
- // Use at your own (considerable) risk.
-
-
- # include "Shell.h"
-
- extern Rect gDeskRect;
- extern MenuHandle gShellMenuHandles[];
-
- /*-------------------------------------------------------------------------
- initshell() Inits all the application-specific variables...
- -------------------------------------------------------------------------*/
-
- void initshell()
- {
- MenuHandle mhndl;
- unsigned long seed;
-
- /* Get Bounding box of Desktop */
- gDeskRect = (**GetGrayRgn()).rgnBBox;
-
- /* Reset random number generator */
- GetDateTime(&seed);
- qd.randSeed = seed;
-
- /* Read in menus, draw the bar... */
- mhndl = GetMenu(kAppleMenuID);
- if(mhndl == nil)
- BailOut();
- AddResMenu(mhndl, 'DRVR');
- (*mhndl)->menuID = kAppleMenuID;
- InsertMenu(mhndl, 0);
- gShellMenuHandles[kAppleMenu] = mhndl;
-
- mhndl = GetMenu(kFileMenuID);
- if(mhndl == nil)
- BailOut();
- (*mhndl)->menuID = kFileMenuID;
- InsertMenu(mhndl, 0);
- gShellMenuHandles[kFileMenu] = mhndl;
-
- mhndl = GetMenu(kEditMenuID);
- if(mhndl == nil)
- BailOut();
- (*mhndl)->menuID = kEditMenuID;
- InsertMenu(mhndl, 0);
- gShellMenuHandles[kEditMenu] = mhndl;
-
- DrawMenuBar();
-
- /* Init the App's stuff */
- if(!AppInit())
- BailOut();
- }
-